package test;

import java.awt.*;
import java.util.HashMap;

/**
 * Created with IntelliJ IDEA.
 * User: Thomas
 * Date: 18/02/14
 * Time: 08:50
 */
public class Config {
    //plus elle est petite plus le tram va vite
    public static int VITESSE_TRAM = 10;

    public enum GraphFile {
        TRAM_GRENOBLE("./ressources/reseauTramGrenoble2010.graph","./ressources/noeud2px_tram.graphpx",GraphColor.TRAM_GRENOBLE),
        METRO_PARIS("./ressources/reseauMetroRERTramParis2009.graph","./ressources/noeud2px_metro.graphpx",GraphColor.METRO_PARIS),
        TEST("./ressources/test.graph","./ressources/test.graphpx",GraphColor.TEST);

        private String graphFilename = "";
        private String graph2pxFilename = "";
        private GraphColor graphColor;

        GraphFile(String graphFilename, String graph2pxFilename, GraphColor graphColor) {
            this.graphFilename = graphFilename;
            this.graph2pxFilename = graph2pxFilename;
            this.graphColor = graphColor;
        }

        public String getGraphFilename() {
            return graphFilename;
        }

        public void setGraphFilename(String graphFilename) {
            this.graphFilename = graphFilename;
        }

        public String getGraph2pxFilename() {
            return graph2pxFilename;
        }

        public void setGraph2pxFilename(String graph2pxFilename) {
            this.graph2pxFilename = graph2pxFilename;
        }

        public GraphColor getGraphColor() {
            return graphColor;
        }

        public void setGraphColor(GraphColor graphColor) {
            this.graphColor = graphColor;
        }
    }

    public enum GraphColor {
        TRAM_GRENOBLE(new HashMap<String, Color>() {{
            put("A",Color.BLUE);
            put("B",new Color(34,176,77));
            put("C",new Color(237,28,36));
            put("D",Color.ORANGE);
        }}),
        TEST(new HashMap<String, Color>() {{
            put("1",Color.BLUE);
            put("2",new Color(34,176,77));
            put("3",new Color(237,28,36));
            put("4",Color.ORANGE);
            put("5",new Color(237, 237, 0));
            put("6",new Color(237, 0, 226));
            put("7",new Color(134, 0, 237));
            put("8",new Color(237, 0, 138));
            put("9",new Color(0, 237, 58));
            put("10",new Color(237, 230, 138));
        }}),
        METRO_PARIS(new HashMap<String, Color>() {{
            put("A",new Color(248,54,11));
            put("B",new Color(248,54,11));//todo
            put("C",new Color(232,200,24));
            put("D",new Color(18,152,12));

            put("0",new Color(183,32,135));//todo
            put("1",new Color(248,184,8));
            put("2",new Color(136,32,135));
            put("3",new Color(183,119,9));
            put("4",new Color(184,34,137));

            put("10",new Color(216,170,22));

            put("12",new Color(8,103,56));
            put("13",new Color(104,185,184));
        }});

        private HashMap<String,Color> colors = new HashMap<String, Color>();

        GraphColor(HashMap<String,Color> colors) {
            this.setColors(colors);
        }

        public HashMap<String, Color> getColors() {
            return colors;
        }

        public void setColors(HashMap<String, Color> colors) {
            this.colors = colors;
        }
    }

    public static int NOEUD_DISTANCE = 100;
    public static int LIGNE_DISTANCE = 200;
}
